package com.ricky;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.config.server.EnableConfigServer;

/**
 * Created by baiguantao on 2017/10/30.
 *
 *
 * http://localhost:50001/abc-dev.yml
 * scconfig_dev
 * http://localhost:50001/abc-dd.yml
 * sc_config_default
 *
 * http://localhost:50001/abc/dev/master
 *
 * {
 name: "abc",
 profiles: [
 "dev"
 ],
 label: "master",
 version: "80017dd2338c1360c95800f5c546d6eb6391c5c5",
 state: null,
 propertySources: [
 {
 name: "https://gitee.com/bgt0314/sc_config/application-dev.yml",
 source: {
 document: "scconfig_dev"
 }
 },
 {
 name: "https://gitee.com/bgt0314/sc_config/application.yml",
 source: {
 document: "sc_config_default"
 }
 }
 ]
 }

 http://localhost:50001/abc/dd/master
 {
 name: "abc",
 profiles: [
 "dd"
 ],
 label: "master",
 version: "80017dd2338c1360c95800f5c546d6eb6391c5c5",
 state: null,
 propertySources: [
 {
 name: "https://gitee.com/bgt0314/sc_config/application.yml",
 source: {
 document: "sc_config_default"
 }
 }
 ]
 }
 */
@SpringBootApplication
@EnableConfigServer
@EnableDiscoveryClient
public class ConfigServerApplication {
    public static void main(String[] args) {
        new SpringApplicationBuilder(ConfigServerApplication.class)
                .web(true)
                .run(args);
    }
}
